/**
 * Created by XK-SH on 2017/5/11.
 */
import Vue from 'vue'
import VueResource from 'vue-resource';
Vue.use(VueResource);

export default {
  /**
   * 添加机构
   */
  addInstitution(query) {
    return Vue.http.post("/institution/m/addInstitution", query);
  },

  /**
   * 删除机构
   */
  deleteInstitution(orgId) {
    return Vue.http.post("/institution/m/deleteInstitution/" + orgId);
  },

  /**
   * 查询组织机构
   */
  getAllInstitutionInfo() {
    return Vue.http.get("/institution/m/getAllInstitutionInfo");
  },

  /**
   * 查询某机构下员工
   */
  getEmpByOrgId(orgId) {
    return Vue.http.get("/institution/m/getEmpByOrgId/" + orgId);
  },

  /**
   * 查询机构详情
   */
  getInstitutionInfoByOrgId(orgId) {
    return Vue.http.get("/institution/m/getInstitutionInfoByOrgId/" + orgId);
  },

  /**
   * 编辑机构
   */
  updateInstitution(query) {
    return Vue.http.post("/institution/m/updateInstitution", query);
  },

  /**
   * 查询省级
   */
  getRegionList(level){
    return Vue.http.get("/institution/m/getRegionListByLevel/"+level);
  },

  /**
   * 查询市级及区级
   */
  getPNO(level,pno){
    return Vue.http.get("/institution/m/getRegionListByPNO/"+level+"/"+pno);
  },


}
